  	<?php if(!empty($output['list'])){?>
  	<?php foreach($output['list'] as $val){?>
    <div class="orderItem">
      <div class="title" style="background-image: url(<?php echo $val['seller_avatar']; ?>)">
        <div class="nickname">
	        <a href="<?php echo BASE_SITE_URL;?>/index.php?act=my&op=home&user_id=<?php echo $val['user_id'];?>&uid=<?php echo $val['seller_id'];?>">
	        	<?php echo $val['seller_name'];?>
	        </a> 
        </div>       
        <div class="status green">
                        <?php 
                        	if($val['order_state']=='0'){
								if($val['is_fail']==1){
									echo '交易失败';
								}else{
									echo '未付款';
								}
							}elseif($val['order_state']=='1'){
								echo '等待卖家发货';
							}elseif($val['order_state']=='2'){ 
								if($val['is_tuihuo']==1){
									if($val['is_fail']!='1'){
										if($val['is_accept']==1){
											echo '同意退货';
										}else{
											echo '申请退款';
										}	
									}else{
										echo '交易失败';
									}								
								}else{
									if($val['currentexchange']==1&&$val['is_fail']==1){
										echo '交易失败';
									}else{
										echo '未确认收货';
									}
									
								}								
							}else{ 
								echo '交易完成';
							}
						?>
        </div>
      </div>
      <div class="info"> 
      	<a href="<?php echo BASE_SITE_URL;?>/index.php?act=order&op=orderuserdetail&order_id=<?php echo $val['id'];?>">
        <?php if($val['order_state']=='0'){?>
        <?php if($val['is_fail']==1){?>
        <div class="content">
          <div class="goodsImg" style="background-image:url(<?php echo UPLOAD_SITE_URL.'/shop/auction/'.$val['auction_add_date'].'/'.$val['auction_img1'];?>);"> </div>
          <div class="desc"><?php echo bearshop_auction_description_substr($val['auction_description']);?></div>
          <ul>
            <li><span>交易失败，买家未付款</span></li>            
            <li><span>截至时间：</span><?php echo date("Y-m-d H:i:s",($val['end_time']+2*24*3600));?></li>
          </ul>
        </div>

        <?php }else{?>
        <div class="content">
          <div class="goodsImg" style="background-image:url(<?php echo UPLOAD_SITE_URL.'/shop/auction/'.$val['auction_add_date'].'/'.$val['auction_img1'];?>);"> </div>
          <div class="desc"><?php echo bearshop_auction_description_substr($val['auction_description']);?></div>
          <ul>
            <li><span>成交金额：</span>￥<?php echo $val['price'];?>元</li>            
            <li><span>付款截至时间：</span><?php echo date("Y-m-d H:i:s",($val['end_time']+2*24*3600));?></li>
          </ul>
        </div>
        <div class="pay">应付：<span>￥<?php echo $val['price'];?>元</span></div>    
        <?php }?>
    
        <?php }elseif($val['order_state']=='1'){?>
	        <?php if($val['is_fail']==1){?>
	        <div class="content">
	          <div class="goodsImg" style="background-image:url(<?php echo UPLOAD_SITE_URL.'/shop/auction/'.$val['auction_add_date'].'/'.$val['auction_img1'];?>);"> </div>
	          <div class="desc"><?php echo bearshop_auction_description_substr($val['auction_description']);?></div>
	          <ul>
	            <li><span>交易失败：</span>卖家未发货</li>            
	            <li><span>交易时间：</span><?php echo date("Y-m-d H:i:s",$val['payment_time']);?></li>
	          </ul>
	        </div>
	        <?php }else{?>
		    <div class="content">
	          <div class="goodsImg" style="background-image:url(<?php echo UPLOAD_SITE_URL.'/shop/auction/'.$val['auction_add_date'].'/'.$val['auction_img1'];?>);"> </div>
	          <div class="desc"><?php echo bearshop_auction_description_substr($val['auction_description']);?></div>
	          <ul>
	            <li><span>成交金额：</span>￥<?php echo $val['price'];?>元</li>            
	            <li><span>成交时间：</span><?php echo date("Y-m-d H:i:s",$val['add_time']);?></li>
	          </ul>
	        </div>
	        <?php }?>

        <?php }elseif($val['order_state']=='2'){?>
        <div class="content">
          <div class="goodsImg" style="background-image:url(<?php echo UPLOAD_SITE_URL.'/shop/auction/'.$val['auction_add_date'].'/'.$val['auction_img1'];?>);"> </div>
          <div class="desc"><?php echo bearshop_auction_description_substr($val['auction_description']);?></div>
          <ul>
            <li><span>成交金额：</span>￥<?php echo $val['price'];?>元</li>            
            <li><span>成交时间：</span><?php echo date("Y-m-d H:i:s",$val['add_time']);?></li>
          </ul>
        </div>
        <?php }elseif($val['order_state']=='3'){?>
	        <?php if($val['is_tuihuo']=='1'){?>
	        <div class="content">
	          <div class="goodsImg" style="background-image:url(<?php echo UPLOAD_SITE_URL.'/shop/auction/'.$val['auction_add_date'].'/'.$val['auction_img1'];?>);"> </div>
	          <div class="desc"><?php echo bearshop_auction_description_substr($val['auction_description']);?></div>
	          <ul>
	            <li><span>退货原因：</span>￥<?php echo $val['reason'];?></li>            
	            <li><span>处理：</span><?php if($val['is_deal']==1){ echo '已处理';}else{ echo '未处理';}?></li>
	          </ul>
	        </div>
	        <?php }else{?>
	        <div class="content">
	          <div class="goodsImg" style="background-image:url(<?php echo UPLOAD_SITE_URL.'/shop/auction/'.$val['auction_add_date'].'/'.$val['auction_img1'];?>);"> </div>
	          <div class="desc"><?php echo bearshop_auction_description_substr($val['auction_description']);?></div>
	          <ul>
	            <li><span>成交金额：</span>￥<?php echo $val['price'];?>元</li>            
	            <li><span>收货时间：</span><?php echo date("Y-m-d H:i:s",$val['shouhuo_time']);?></li>
	          </ul>
	        </div>
	        <?php }?>
        <?php }?>
        </a> 
        </div>
        <div class="tools">
		      <?php if($val['order_state']=='0'){?>  
              <?php if($val['is_fail']!='1'){?>
		      		<button order_id="<?php echo $val['id'];?>" class="paymentnow">立即付款</button>
              <?php }?>    	
		      <?php }elseif($val['order_state']=='1'){?>

		      <?php }elseif($val['order_state']=='2'&&$val['is_fail']=='0'){?> 
		      	  <?php if($val['currentexchange']!='1'){?>
			      	  <?php if(($val['is_tuihuo']=='0')&&(($val['fahuo_time']+48*3600)<time())){?>
			      	  <?php //if($val['is_tuihuo']=='0'){?>
				      <button class="applytuihuo" order_id="<?php echo $val['id'];?>">申请退款</button>
				      <?php }?>
				      <?php if($val['is_delay']=='1'&& $val['is_fail']=='0'){?>
				      
					      <?php if(($val['is_accept']==1)&&empty($val['tuihuo_express'])){?>
					      <button class="lijituihuo" order_id="<?php echo $val['id'];?>">立即退货</button>
					      <button class="mysendout" aid="<?php echo $val['auction_id'];?>">确认收货</button>	      
					      <?php }?>
				      <?php }else{?>
				      	  <?php if(($val['is_accept']==1)&&empty($val['tuihuo_express'])){?>
				      	  <button class="lijituihuo" order_id="<?php echo $val['id'];?>">立即退货</button>
				      	  <?php }?>				      	  
				      <?php }?>
			      <?php }else{?>
			      	  <button class="refusecurrentexchange" style="width:100px;">拒绝当面交易</button>	
			      	  <button class="refusesendout">拒绝收货</button>	
			      <?php }?>
			      <?php if(empty($val['is_accept'])||$val['is_accept']==2){?>
			      <button class="mysendout" aid="<?php echo $val['auction_id'];?>">确认收货</button>
			      <?php }?> 
		      <?php }elseif($val['order_state']=='3'){?>
		      	  <?php if(empty($val['order_comment'])){?>
			      <button order_id="<?php echo $val['id'];?>" class="commentnow">立即评价</button>
			      <?php }?>
		      <?php }?> 
		</div>
    </div>
    <?php }?>
    <?php }?>